<header>
    <title>规格{notempty name="list"}修改{else /}添加{/notempty}</title>
</header>
{include file="public/header" /}
<!-- 内容主体区域 -->
<br />
<div style="padding: 15px;">

    <form class="layui-form" action="" method="post">
        {notempty name='list'}<input type="hidden" name="id" value="{$list.id}">{/notempty}

        <div class="layui-form-item">
            <label class="layui-form-label">规格名称：</label>
            <div class="layui-input-block">
                <input type="text" {notempty name='list'}value="{$list.spec_name}"{/notempty} style="width: 240px;" name="spec_name" required  lay-verify="required" placeholder="请输入规格名" autocomplete="off" class="layui-input">
            </div>

        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>

            <div class="layui-input-block">
                <input type="radio" name="status" value="0" title="启用" {notempty name='list'} {if $list['status']==0}checked{/if}{else /}checked{/notempty}>
                <input type="radio" name="status" value="1" title="未启用"{notempty name='list'} {if $list['status']==1}checked{/if}{/notempty}>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;

            //监听提交
            /*form.on('submit(formDemo)', function(data){
                layer.msg(JSON.stringify(data.field));
                return false;
            });*/
        });
    </script>
    {include file="public/footer" /}